<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>猴子吃桃</title>
    <script>
        var i = 9;
        var j = 0,k = 1;
        for(var i = 9;i > 0;i--)
        {
            j = (k+1)*2;
            k = j;  
        }
        console.log("猴子总共吃了："+j+"个桃");
    </script>
</head>
<body>
    
</body>
</html>